package com.fare.taluo.fetl.domain.entity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Table;

import com.fare.taluo.fetl.domain.base.BaseFetlEntity;


@Entity
@Table(name="planeinfo_json_double")
public class DoublePlanInfoJsonEntity extends BaseFetlEntity {
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 4918108137524252901L;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	private Long id;
	
	@Column(name="AGENTS_JSON")
	private String agentsJson;
	
	@Column(name="CABINS_JSON")
	private String cabinsJson;
	
	@Column(name="CABIN_RELATIONS_JSON")
	private String cabinRelationsJson;
	
	@Column(name="TRANSITS_JSON")
	private String transitsJson;
	
	@Column(name="STOPOVERS_JSON")
	private String stopOversJson;
	
	@Column(name="RETURN_PLANEINFOS_JSON")
	private String returnPlaneInfosJson;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}


	public String getAgentsJson() {
		return agentsJson;
	}

	public void setAgentsJson(String agentsJson) {
		this.agentsJson = agentsJson;
	}

	public String getCabinsJson() {
		return cabinsJson;
	}

	public void setCabinsJson(String cabinsJson) {
		this.cabinsJson = cabinsJson;
	}

	public String getTransitsJson() {
		return transitsJson;
	}

	public void setTransitsJson(String transitsJson) {
		this.transitsJson = transitsJson;
	}

	public String getStopOversJson() {
		return stopOversJson;
	}

	public void setStopOversJson(String stopOversJson) {
		this.stopOversJson = stopOversJson;
	}
	

	public String getCabinRelationsJson() {
		return cabinRelationsJson;
	}

	public void setCabinRelationsJson(String cabinRelationsJson) {
		this.cabinRelationsJson = cabinRelationsJson;
	}

	public String getReturnPlaneInfosJson() {
		return returnPlaneInfosJson;
	}

	public void setReturnPlaneInfosJson(String returnPlaneInfosJson) {
		this.returnPlaneInfosJson = returnPlaneInfosJson;
	}

	@Override
	public boolean isNew() {
		return getId() == null ;
	}

	@Override
	public boolean existed() {
		if (isNew()) {
			return false;
		}
		return getBaseEntityRepository().exists(getClass(), getId());
	}

	@Override
	public boolean notExisted() {
		return ! existed();
	}
	@Override
	public boolean existed(String propertyName, Object propertyValue) {
		// TODO Auto-generated method stub
		return false;
	}


	
	

}
